import Vue from 'vue';

import Router from 'vue-router';

import articleIndex from '@/components/articleIndex';
import drdetail from '@/components/drdetail';
import drList from '@/components/drList';
import HomePage from '@/components/HomePage';
import intro from '@/components/intro';
import list from '@/components/list';
import login from '@/components/login';
import thoughtArticle from '@/components/thoughtArticle';
import thoughtDetail from '@/components/thoughtDetail';
import thoughtIndex from '@/components/thoughtIndex';
import upload from '@/components/upload';
import user from '@/components/user';
import workDetail from '@/components/workDetail';

Vue.use(Router)

export default new Router({
  // base: '/wechat/ncgy/ydjdk2024',
  // mode: 'history',
  routes: [
        {
            path: '/',
            name: 'HomePage',
            component: HomePage
        },
        {
          path: '/login',
          name: 'login',
          component: login
            },
            {
              path: '/upload',
              name: 'upload',
              component: upload,
              meta:{
                loginRequired:true
          },
           },
          {
            path: '/list',
            name: 'list',
            component: list
        },
        {
          path: '/workDetail',
          name: 'workDetail',
          component: workDetail
      },
      {
        path: '/thoughtDetail',
        name: 'thoughtDetail',
        component: thoughtDetail
    },
      {
        path: '/user',
        name: 'user',
        component: user,
        meta:{
          loginRequired:true
        },
    },
    {
      path: '/drList',
      name: 'drList',
      component: drList
     },
      {
        path: '/drdetail',
        name: 'drdetail',
        component: drdetail
    },
    {
      path: '/intro',
      name: 'intro',
      component: intro
  },
  {
    path: '/thoughtArticle',
    name: 'thoughtArticle',
    component: thoughtArticle
},
    {
      path: '/articleIndex',
      name: 'articleIndex',
      component: articleIndex
  },
  {
    path: '/thoughtIndex',
    name: 'thoughtIndex',
    component: thoughtIndex
},
  ]
})